package org.jeecg.modules.htxincailiao.order.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.htxincailiao.order.constant.HTOrderTypeEnum;
import org.jeecg.modules.htxincailiao.order.domain.bo.HTIndustryOrderCreateBO;
import org.jeecg.modules.htxincailiao.order.domain.vo.HTOrderSalesStatisticsVO;
import org.jeecg.modules.htxincailiao.order.domain.vo.HTOrderStatisticsVO;
import org.jeecg.modules.htxincailiao.order.domain.vo.HTOrderVO;
import org.jeecg.modules.htxincailiao.order.domain.bo.HTOrderInfoBO;
import org.jeecg.modules.htxincailiao.order.domain.bo.HTSubmitOrderBO;
import org.jeecg.modules.htxincailiao.order.domain.vo.HTSubmitOrderVO;
import org.jeecg.modules.htxincailiao.order.entity.HTOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.htxincailiao.payment.entity.HTPayment;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * @Description: ht_order
 * @Author: jeecg-boot
 * @Date:   2021-11-08 16:58:42
 * @Version: V1.0
 */
public interface IHTOrderService extends IService<HTOrder> {

    public HTSubmitOrderVO createOrderForIndustry(HTIndustryOrderCreateBO bo);

    public HTSubmitOrderVO submitOrder(HTSubmitOrderBO dto);

    public HTOrderVO getOrderInfoByOrderInfoType(HTOrderInfoBO bo);

    public HTOrder queryByOrderSn(String orderSn);

    public boolean handleOrderBusinessAfterPaySucceed(String transactionId, String payerId, String outTradeNo);

    public boolean handleIndustryOrderAfterPaySucceed(HTOrderTypeEnum orderType, String transactionId, String payerId, String outTradeNo);

    public List<HTOrder> findAllByParentId(String parentId);

    public IPage<HTOrderVO> pageBy(Page<HTOrder> page, QueryWrapper<HTOrder> queryWrapper);

    HTOrderStatisticsVO getStatistics(String dayTime);


    List<HTOrderSalesStatisticsVO> getSalesStatistics(String beginTime,
                                                        String endTime);

}
